﻿<!-- WorkflowEngineSampleCode -->
<div bsModal #createWorkflowModal="bs-modal" class="modal fade" (onShown)="onShown()" tabindex="-1" role="dialog" aria-labelledby="createWorkflowModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog">

        <div #modalContent class="modal-content">
            <form *ngIf="active" #createSchemeForm="ngForm" id="frm_create_scheme" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">
                        <span>{{ "Create a workflow scheme" | localize }}</span>
                    </h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-sm-12">
                            <div class="form-group form-float">
                                <div class="form-line">
                                    <input id="code" type="text" name="Code" [(ngModel)]="scheme.code" required maxlength="32" minlength="2" class="validate form-control">
                                    <label for="code" class="form-label">{{ "Code" | localize }}</label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default waves-effect" (click)="close()">
                        {{ "Cancel" | localize }}
                    </button>
                    <button [disabled]="!createSchemeForm.form.valid || saving" type="submit" class="btn btn-primary waves-effect">
                        {{ "Create" | localize }}
                    </button>
                </div>

            </form>
        </div>
    </div>
</div>